package com.ostrich.a2104shopping.ui.home.viewmodel;

import com.ostrich.a2104shopping.ui.home.HomeRepository;
import com.ostrich.a2104shopping.ui.home.entity.AddCarRequestEntity;
import com.ostrich.a2104shopping.ui.home.entity.GoodsDetailEntity;
import com.ostrich.lib_common.net.BaseResponseEntity;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/7 08:06
 * @Description : GoodsDetailViewModel
 */
public class GoodsDetailViewModel extends ViewModel {
    private HomeRepository mHomeRepository = new HomeRepository();


    public LiveData<BaseResponseEntity<GoodsDetailEntity>> detail(int goods_id){
        return mHomeRepository.detail(goods_id);
    }

    public LiveData<BaseResponseEntity> addCar( AddCarRequestEntity requestEntity){
        return mHomeRepository.addCar(requestEntity);
    }
}
